/* topnav */
#topnav {
  background: #000;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 7;
}

.tn-btns {
  display: flex;
  justify-content: space-between;
}

.tn-btn {
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.tn-btn .logo {
  width: 22px;
  height: 22px;
  opacity: 0.8;
}

.tg-btn span {
  width: 18px;
  height: 1px;
  background: #fff;
  opacity: 0.8;
  position: relative;
  transition: transform 0.2s ease-in-out, top 0.2s ease-in-out 0.1s;
}

.tg-btn:hover span {
  opacity: 1;
}

.tn-btns {
  position: relative;
  z-index: 9;
}

#toggle {
  display: none;
}

#toggle ~ .tn-btns .tg-btn span:nth-of-type(1) {
  top: -4px;
}

#toggle ~ .tn-btns .tg-btn span:nth-of-type(2) {
  top: 4px;
}

#toggle:checked ~ .tn-btns .tg-btn span:nth-of-type(1) {
  transform: rotate(45deg);
  top: 0;
  transition: top 0.2s ease-in-out, transform 0.2s ease-in-out 0.1s;
}

#toggle:checked ~ .tn-btns .tg-btn span:nth-of-type(2) {
  transform: rotate(-45deg);
  top: -1px;
  transition: top 0.2s ease-in-out, transform 0.2s ease-in-out 0.1s;
}

#toggle ~ .tn-list {
  padding: 40px;
  width: 100%;
  height: calc(100vh - 48px);
  background: #000;
  position: absolute;
  z-index: 8;
  transition: transform 0.4s ease-in-out;
  transform: scaleY(0);
  transform-origin: top;
}

#toggle:checked ~ .tn-list {
  transform: scaleY(1);
}

.tn-item::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: #424245;
}

.tn-item:nth-of-type(1)::before {
  display: none;
}

.tn-link {
  color: #f5f5f7;
  height: 44px;
  line-height: 44px;
  opacity: 0.8;
  display: block;
  transition: opacity 0.3s;
}

.tn-link:hover {
  opacity: 1;
}

@media (min-width: 640px) {
  .tn-btns {
    display: none;
  }

  #toggle ~ .tn-list {
    display: flex;
    padding: 0;
    max-width: 1024px;
    justify-content: space-evenly;
    margin: 0 auto;
    font-size: 12px;
    font-weight: 400;
    transform: scaleY(1);
    height: auto;
    position: relative;
  }

  .tn-link {
    padding: 0 8px;
  }
}
